
//
// 20120220 - AH - (Aura) Created.
// 20120221 - AH - (Fantoft Club) Made AttributeObject
//

package org.soekrat.engine.motor;

import org.soekrat.AttributeObject;

/**
 * <p>
 *   Represents an event of a
 *   {@link ConversationElement} life.
 * </p>
 * @author Arne Halvorsen (AH)
 */
public final class ConversationEvent extends AttributeObject 
{
  private final String m_desc;
  
  /**
   * <p>
   *   Constructor.
   * </p>
   * @param desc Description of the event.
   */
  public ConversationEvent(String desc)
  {
    if (desc==null)
    {
      throw new NullPointerException("desc");
    }
    
    m_desc=desc;
  }
  
  @Override
  public String toString()
  { 
    StringBuilder sb=new StringBuilder();
    sb.append(m_desc);
    String txt=attributesToString(false);
    txt=(txt==null) ? "" : txt.trim();
    if (txt.length()>0) sb.append(" : ").append(txt);
    return sb.toString();
  }
 
}
